import { useDark } from '@vueuse/core';
const isDark = useDark();

export const clr = (): any => {
  if (isDark.value) {
    return {
      // ------------------------------------------< heap >------------------------------------------
      heap: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#454776' }, { offset: 1, color: '#905C287B' }]
      },
      heapLabelStyle: 'style="color:#5358EC;font-weight: blod;"',
      // ------------------------------------------< old >------------------------------------------
      old: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#935619' }, { offset: 1, color: '#EE994300' }]
      },
      oldLine: '#CF853B',
      oldLabelStyle: 'style="color:#935619;font-weight: 500;"',
      // ------------------------------------------< eden >------------------------------------------
      eden: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#4749BA' }, { offset: 1, color: '#8788E045' }]
      },
      edenLine: '#464AD2CF',
      edenLabelStyle: 'style="color:#4749BA;font-weight: 500;"',
      // ------------------------------------------< Survivor >------------------------------------------
      survivor: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#777777' }, { offset: 1, color: '#9E9E9E3E' }]
      },
      // ------------------------------------------< Survivor >------------------------------------------
      nonHeap: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#00238C' }, { offset: 1, color: '#5470C62B' }]
      },
      metaspace: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#1E5F00' }, { offset: 1, color: '#86DB5F2C' }]
      },
      red: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#6E0000' }, { offset: 1, color: '#C6545427' }]
      }
    }
  } else {
    return {
      // ------------------------------------------< heap >------------------------------------------
      heap: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#5358EC' }, { offset: 1, color: '#EE994353' }]
      },
      heapLabelStyle: 'style="color:#5358EC;font-weight: blod;"',
      // ------------------------------------------< old >------------------------------------------
      old: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#C17E3B' }, { offset: 1, color: '#EE994300' }]
      },
      oldLine: '#A6611CCC',
      oldLabelStyle: 'style="color:#C17E3B;font-weight: 500;"',
      // ------------------------------------------< eden >------------------------------------------
      eden: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#8789e0' }, { offset: 1, color: '#8788E087' }]
      },
      edenLine: '#464AD2CF',
      edenLabelStyle: 'style="color:#8789e0;font-weight: 500;"',
      // ------------------------------------------< Survivor >------------------------------------------
      survivor: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#777777' }, { offset: 1, color: '#9E9E9E' }]
      },
      // ------------------------------------------< Survivor >------------------------------------------
      nonHeap: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#5470c6' }, { offset: 1, color: '#5470C662' }]
      },
      metaspace: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#42B70C' }, { offset: 1, color: '#86DB5F' }]
      },
      red: {
        type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
        colorStops: [{ offset: 0, color: '#C40606' }, { offset: 1, color: '#C6545427' }]
      }
    }
  }
}